<!--
  @author mujunlin
  @since 2019/08/15 10:59
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:replace="common/common :: jscss"/>
</head>
<body>
<div class="layui-fluid">
    <blockquote class="layui-crumb">
        <a lay-href="/company/list.action">公司管理</a>&nbsp;&nbsp;/&nbsp;
        <zmn th:text="${(company.companyId == null||company.companyId == 0) ? '新增公司':company.name}">新增或修改公司</zmn>
    </blockquote>

    <div class="layui-card">
        <div th:replace="company/_tab::tab"></div>
        <div class="layui-card-body">
            <form method="POST" action="" class="layui-form" lay-filter="zmn-company-form">
                <div class="layui-card-header layui-margin-b"><b>银行账户</b></div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">开户行：</label>
                    <div class="layui-input-inline" style="width:436px">
                        <input type="text" name="bankName" placeholder="开户行" lay-verify="required"
                               lay-verType="tips" th:value="${company.bankName}"
                               autocomplete="off" class="layui-input" maxlength="20"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">银行卡号：</label>
                    <div class="layui-input-inline" style="width:436px">
                        <input type="text" name="bankCardNo" placeholder="银行卡号" lay-verify="required|num"
                               lay-verType="tips" th:value="${company.bankCardNo}"
                               autocomplete="off" class="layui-input" maxlength="20"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">户名：</label>
                    <div class="layui-input-inline" style="width:436px">
                        <input type="text" name="bankCardName" placeholder="户名" lay-verify="required"
                               lay-verType="tips" th:value="${company.bankCardName}"
                               autocomplete="off" class="layui-input" maxlength="20"/>
                    </div>
                </div>

                <div class="layui-card-header layui-margin-b"><b>其他信息</b></div>
                <div class="layui-form-item">
                    <label class="layui-form-label">开票路由：</label>
                    <div class="layui-input-inline" style="width:436px">
                        <select name="invoicingRouting">
                            <option value="">请选择</option>
                            <option value="1" th:selected="${company.invoicingRouting == 1}">新科讯</option>
                            <option value="2" th:selected="${company.invoicingRouting == 2}">人工开票</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">财务电话：</label>
                    <div class="layui-input-inline" style="width:436px">
                        <input type="text" name="financePhone" placeholder="财务电话" lay-verify="num"
                               lay-verType="tips" th:value="${company.financePhone}"
                               autocomplete="off" class="layui-input" maxlength="20"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">公司税点：</label>
                    <div class="layui-input-inline" style="width:436px">
                        <select name="taxPoint"
                                lay-filter="taxPoint" lay-search>
                            <option value="">请选择</option>
                            <option value="0" th:selected="${company.taxPoint == 0}">0</option>
                            <option value="3" th:selected="${company.taxPoint == 3}">3</option>
                            <option value="6" th:selected="${company.taxPoint == 6}">6</option>
                            <option value="13" th:selected="${company.taxPoint == 13}">13</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">是否含税：</label>
                    <div class="layui-input-inline" style="width:436px">
                        <input type="radio" name="taxIncluded" value="2"
                               th:checked="${company.taxIncluded == 2}" title="含税">
                        <input type="radio" name="taxIncluded" value="1"
                               th:checked="${company.taxIncluded == 1}" title="不含税">
                    </div>
                </div>

                <div class="layui-form-item submit">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-company-form-submit" id="subBtn"
                                th:if="${#authPermit.checkPermit('/company/addEdit.action')}">提交
                        </button>
                        <button type="button" class="layui-btn layui-btn-primary cancleBtn">取消</button>
                    </div>
                </div>
            </form>
        </div>


    </div>
</div>
<script type="text/javascript" th:inline="javascript">
    let json = {
        company: [[${company}]]
    };

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        art_company_finance: "company/zmn.art.company.finance",
    }).use(['index', 'art_company_finance']);

</script>
<style>

    .addRedStar:before {
        content: '*';
        color: red;
        font-size: 18px;
    }

</style>
</body>
</html>